import {VCairnCommand} from "./VCairnCommand";
import {VCairnEvent} from "./VCairnEvent";

export class VCairnSeqCommand extends VCairnCommand {
    public nextEvents:VCairnEvent[];

    constructor(nextEvents?:VCairnEvent[]) {
        super();
        this.nextEvents = nextEvents || [];
    }

    executeNextCommands() {
        if (this.nextEvents) {
            this.nextEvents.forEach(evt => {
                evt.emit();
            })
        }
    }

}